package com.hzau.tourist_service_sys.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;//响应码,200 成功,300 失败
    private  String message; //相应信息 描述字符串
    private Object result;//返回的数据

    public static  Result success(){
        return new Result(200,"success",null);
    }
    public static Result success(Object data){
        return  new Result(200,"success",data);
    }
    public static Result error(String msg){
        return  new Result(300,msg,null);
    }
//    public static  Result success(MultipartFile file){return  new Result(200,"success",null,file);}
}
